<template>
  <div class="content">
    <div class="title"><span>国内疫情汇总</span></div>
    <div class="title1">
      <span>截至北京时间 {{ modifyTime.modifyTime | time }}</span>
      <div>
        <img src="../../../assets/images/问号.png" width="12px" alt="" />
        <em>数据说明</em>
      </div>
    </div>
    <ul class="wrap">
      <li>
        <span
          >较昨日<em style="color: #f74c31">{{
            covData.currentConfirmedIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.currentConfirmedCount | getArea }}</div>
        <strong>现存确诊</strong>
      </li>
      <li>
        <span
          >较昨日<em style="color: #f78207">{{
            covData.suspectedIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.suspectedCount | getArea }}</div>
        <strong>境外输入</strong>
      </li>
      <li>
        <span
          >较昨日<em style="color: #a25a4e">{{
            covData.seriousIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.seriousCount | getArea }}</div>
        <strong>现存无症状</strong>
      </li>
      <li>
        <span
          >较昨日<em style="color: #ae212c">{{
            covData.confirmedIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.confirmedCount | getArea }}</div>
        <strong>累计确诊</strong>
      </li>
      <li>
        <span
          >较昨日<em style="color: #5d7092">{{
            covData.deadIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.deadCount | getArea }}</div>
        <strong>累计死亡</strong>
      </li>
      <li>
        <span
          >较昨日<em style="color: #28b7a3">{{
            covData.curedIncr | number | getArea
          }}</em></span
        >
        <div class="bold">{{ covData.curedCount | getArea }}</div>
        <strong>累计治愈</strong>
      </li>
    </ul>
    <!-- 地图容器 -->
    <!-- 为 ECharts 准备一个定义了宽高的 DOM -->
    <!-- <div id="chart" style="width: 7rem;height:8rem;"></div> -->
  </div>
</template>

<script>
export default {
  props: ["covData", "modifyTime"],

  //定义过滤器
  filters: {
    //较昨日如果>0 补+
    number: function (val) {
      val = val > 0 ? "+" + val : val;
      return val;
    },
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.content {
  background: #fff;
  padding: 0.2rem;
  min-height: 2rem;
  .title1 {
    color: #666;
    margin-bottom: 0.3rem;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    div {
      border-radius: 10px;
      img {
        margin-right: 3.7px;
      }
    }
  }
  .title {
    span {
      padding-left: 10px;
      font-size: 17px;
    }
  }
}
.wrap {
  display: flex;
  flex-wrap: wrap;
  padding-top: 0.2rem;
  border-radius: 0.1rem;
  box-shadow: 0 0 3px 2px rgba(151, 150, 150, 0.2);
  li {
    width: 33.33333%;
    text-align: center;
    margin-bottom: 0.2rem;
    color: #666;
    font-size: 12px;
    strong {
      color: #333;
    }
  }
  .bold {
    font-size: 20px;
    font-weight: bold;
  }
  li:nth-child(1) .bold {
    color: #f74c31;
  }
  li:nth-child(2) .bold {
    color: #f78207;
  }

  li:nth-child(3) .bold {
    color: #a25a4e;
  }
  li:nth-child(4) .bold {
    color: #ae212c;
  }
  li:nth-child(5) .bold {
    color: #5d7092;
  }
  li:nth-child(6) .bold {
    color: #28b7a3;
  }
  li:nth-child(2),
  li:nth-child(5) {
    position: relative;
  }
  li:nth-child(2)::before,
  li:nth-child(5)::before {
    content: " ";
    position: absolute;
    left: 0;
    bottom: 11px;
    width: 1px;
    height: 35px;
    border-left: 1px solid #e7e7e7;
  }
  li:nth-child(2)::after,
  li:nth-child(5)::after {
    content: " ";
    position: absolute;
    right: 0;
    bottom: 11px;
    width: 1px;
    height: 35px;
    border-right: 1px solid #e7e7e7;
  }
}
</style>
